<?php
defined( '_JEXEC' ) or die( 'Restricted access' );
JToolBarHelper::preferences( 'com_meupload' );
?>
<script type="text/javascript">
function isChecked(isitchecked){
    if (isitchecked == true){
        document.adminForm.boxchecked.value++;
    }
    else {
        document.adminForm.boxchecked.value--;
    }
}

function submitbutton(button){
    if(button=='remove'){
        if(confirm("If you delete folder images inside must be delete too.\nDo you want to delete folder?")===false){
            return false;
        }else{
            submitform(button);
        }
    }else{
        submitform(button);
    }
}
</script>
<form id="adminForm" name="adminForm" method="post" action="index.php">
    <ul>
    <?php
    $i=0;
    foreach($this->dirlist AS $dirlist){
        $num = $this->numfile[$i];
        $i++;
        echo '<li>';
        echo '<input type="checkbox" name="cid[]" id="'.$dirlist.'" value="'.$dirlist.'" onclick="isChecked(this.checked);"/>'
            .'<label for="'.$dirlist.'">'
            //.'<a href="index.php?option=com_meupload&task=edit&cid[]='.$dirlist.'">'.$dirlist.'</a> ('.$num.')'
            .$dirlist.' ('.$num.')'
            .'</label>'
            ;
        echo '</li>';
    }
    ?>
    </ul>
    <input type="hidden" name="boxchecked" value="0">
    <input type="hidden" name="task" value="" />
    <input type="hidden" neme="step" value="2" />
    <input type="hidden" name="option" value="com_meupload" />
    <?php echo JHTML::_( 'form.token' ); ?>
</form>